/*
 * StringUtils.h
 *
 *  Created on: 25.11.2012
 *      Author: shadius
 */

#ifndef STRINGUTILS_H_
#define STRINGUTILS_H_

class StringUtils {

public:
	static bool replace(std::string& str, const std::string& from,
			const std::string& to) {
		size_t start_pos = str.find(from);
		if (start_pos == std::string::npos)
			return false;
		str.replace(start_pos, from.length(), to);
		return true;
	}
};

#endif /* STRINGUTILS_H_ */
